package com.eleventwelve.iris.entity;

import javax.persistence.Column;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Lob;
import javax.persistence.Table;

import javax.persistence.Entity;

import org.opentides.bean.Auditable;
import org.opentides.bean.AuditableField;
import org.opentides.bean.BaseEntity;
import org.opentides.bean.Searchable;
import org.opentides.bean.Sortable;

/**
 * 
 * @author Ashley
 *
 */
@Entity
@Table(name="MEDICAL_PROGRAM")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class MedicalProgram extends BaseEntity implements Searchable, Sortable, Auditable{
	private static final long serialVersionUID = 6271334679573651721L;

	@Column(name="NAME")
	private String name;
	
	@Lob
	@Column(name="DESCRIPTION")
	private String description;
	
	@Lob
	@Column(name="GOAL")
	private String goal;
	
	//should have a list of procedures here
	
//	@OneToMany(fetch = FetchType.LAZY, mappedBy = "medicalProgram")
//	private List<MedicalProcedure> medicalProcedures;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getGoal() {
		return goal;
	}

	public void setGoal(String goal) {
		this.goal = goal;
	}

//	public Set<MedicalProgramTreatment> getMedicalProgramTreatments() {
//		return medicalProgramTreatments;
//	}
//
//	public void setMedicalProgramTreatments(Set<MedicalProgramTreatment> medicalProgramTreatments) {
//		this.medicalProgramTreatments = medicalProgramTreatments;
//	}

	@Override
	public AuditableField getPrimaryField() {
		return new AuditableField(this.name);
	}
}
